<?php
//后台首页控制器
class IndexController extends BaseController{
	public function indexAction() {
		//echo "admin...index";
		include CUR_VIEW_PATH . "index.html";
	}

	public function topAction() {
		include CUR_VIEW_PATH . "top.html";
	}

	public function menuAction() {
		include CUR_VIEW_PATH . "menu.html";
	}

	public function dragAction() {
		include CUR_VIEW_PATH . "drag.html";
	}
	public function mainAction() {
		//实例化adminModel，
		$adminModel = new AdminModel('admin'); //注意穿参数
		$admins = $adminModel->getAdmins();
		echo "<pre>";
		print_r($admins);
		include CUR_VIEW_PATH . "main.html";
	}

	//生成验证码
	public function codeAction(){
		//引入验证码类
		$this->library('Captcha');
		//实例化对象
		$captcha = new Captcha();
		//调用方法
		$captcha->generateCode();
	}
}